package com.nf.health.app.utils;

import android.app.Activity;

import com.nf.health.app.R;


public class AnimationUtil {
	/**
	 * 开启前一个Activity()，且finish自己。以动画的方式向右滑动
	 * @param activity
	 * @param view
	 */
	public static void showPreCloseMe(Activity activity) {
		activity.finish();
		activity.overridePendingTransition(R.anim.slide_out_to_right, R.anim.slide_in_from_left);
	}
	/**
	 * 开启前一个Activity()，不finish自己。以动画的方式向右滑动
	 * @param activity
	 * @param view
	 */
	public static void showPre(Activity activity) {
		activity.overridePendingTransition(R.anim.slide_out_to_right, R.anim.slide_in_from_left);
	}
	/**
	 * 开启下一个Activity，且finish自己
	 * @param activity
	 * @param view
	 */
	public static void showNextFinishMe(Activity activity) {
		activity.finish();
		activity.overridePendingTransition(R.anim.slide_in_from_right,R.anim.slide_out_to_left);
	}
	/**
	 * 开启下一个Activity()，不finish自己。会以动画的形式向左滑动
	 * @param activity 当前的Activity
	 */
	public static void showNext(Activity activity) {
		activity.overridePendingTransition(R.anim.slide_in_from_right,R.anim.slide_out_to_left);
	}
}
